/**
 * create by young (young2f@outlook.com) on 2020/11/3
 */
'use strict';
import {notification} from 'antd';
import styles from './index.less';
import React from 'react';

const notify = ({type, message, description = ''}) => {
    if (!type || !message) return
    let duration = type === 'info' ? 0.5 : 4.5;
    notification[type]({
        message,
        duration,
        description: <div style={{color: '#8c8c8c'}}>{description}</div>,
        // placement: 'bottomRight',
        className: styles.global,
    });
};

export default notify;
